def double(x):
    return x * 2

def triple(x):
    return x * 3

#函数calc根据形参的值返回函数double或函数triple
def calc(n):
   if(n==2):
       return double
   else:
       return triple

print(calc(2)(6))
print(calc(3)(5))